// reset

body {
  font-family: $font-family-base;
  font-size: $font-size-base;
  color: $text-color;
  font-smoothing: antialiased;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: $line-height-base;
}

*:focus:not(:focus-visible) {
  outline: 0 !important;
}

.h1, .h2, .h3, .h4, .h5, .h6 {
  margin: 0;
}

// Links
// -------------------------

a {
  color: $link-color;
  text-decoration: none;
  cursor: pointer;
}

a:hover,
a:focus {
  color: $link-hover-color;
  text-decoration: none;
}

label {
    color: lighten($black, 20%);
    font-weight: normal;
    font-size: $font-size-sm;
    word-break: normal;
    white-space: nowrap;
}

small, .small {
  font-size: $font-size-sm;
}

.badge, .label {
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .2)
}

.badge.bg-light, .label.bg-light {
  text-shadow: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    align-content: center;

    &.up {
        position: relative;
        top: -10px;
        padding: 3px 6px;
        margin-left: -10px;
    }
}

blockquote {
  border-color: $border-color;
}

.caret-white {
  border-top-color: #fff;
  border-top-color: rgba(255, 255, 255, .65);
  a:hover & {
    border-top-color: #fff;
  }
}

.thumbnail {
  border-color: $border-color;
}

.progress {
  background-color: $light;
}

.progress-xxs {
  height: 2px
}

.progress-xs {
  height: 6px
}

.progress-sm {
  height: 12px;
  .progress-bar {
    font-size: 10px;
    line-height: 1rem;
  }
}

.progress, .progress-bar {
  @include box-shadow(none);
}

.progress-bar-primary {
  background-color: $primary;
}

.progress-bar-info {
  background-color: $info;
}

.progress-bar-success {
  background-color: $success;
}

.progress-bar-warning {
  background-color: $warning;
}

.progress-bar-danger {
  background-color: $danger;
}

.progress-bar-black {
  background-color: $black;
}

.progress-bar-white {
  background-color: #fff;
}

.accordion-group,
.accordion-inner {
  border-color: $border-color;
  border-radius: $border-radius-base;
}

.alert {
  font-size: $font-size-sm;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-radius: 0;
  border: 0;
  p,ul{
    margin-bottom: 0;
  }
  .close i {
    font-size: 12px;
    font-weight: normal;
    display: block;
  }
}

.form-control {
  border-color: $input-border;
  border-radius: $input-border-radius;
  &,
  &:focus {
    @include box-shadow(none);
  }
  &:focus {
    border-color: $input-border-focus;
  }
}

.form-horizontal {
  .control-label.text-left {
    text-align: left;
  }
}

.form-control-spin {
  position: absolute;
  z-index: 2;
  right: 10px;
  top: 50%;
  margin-top: -7px;
}

.input-lg {
  height: 45px;
}

.input-group-addon {
  border-color: $input-border;
  background-color: $light;
}

.list-group {
  border-radius: $border-radius-base;
  &.no-radius {
    .list-group-item {
      border-radius: 0 !important;
    }
  }
  &.no-borders {
    .list-group-item {
      border: none;
    }
  }
  &.no-border {
    .list-group-item {
      border-width: 1px 0;
    }
  }
  &.no-bg {
    .list-group-item {
      background-color: transparent;
    }
  }
}

.list-group-item {
  border-color: $list-group-item-border;
  padding-right: 15px;
  a#{&} {
    &:hover,
    &:focus,
    &.hover {
      background-color: $list-group-item-hover;
    }
  }
  &.media {
    margin-top: 0;
  }
  &.active {
    color: #fff;
    border-color: $list-group-active-color !important;
    background-color: $list-group-active-color !important;
    .text-muted {
      color: lighten($list-group-active-color, 30%) !important;
    }
    a {
      color: #fff;
    }
  }
  &.focus {
    background-color: $list-group-item-focus !important;
  }
  &.select {
    position: relative;
    z-index: 1;
    background-color: $list-group-select-color !important;
    border-color: darken($list-group-select-color, 5%);
  }

  .list-group-alt & {
    &:nth-child(2n+2) {
      background-color: rgba(0, 0, 0, 0.02) !important;
    }
  }
  .list-group-lg & {
    padding-top: 15px;
    padding-bottom: 15px;
  }
  .list-group-sm & {
    padding: 6px 10px;
  }
  .list-group-sp & {
    margin-bottom: 5px;
    border-radius: 3px;
  }
  > .badge {
    margin-right: 0;
  }
}

.nav {
  .nav-item {
      align-items: center;
      display: flex;
      flex-direction: row;
      text-overflow: ellipsis;

      .nav-link {
          width: 100%;
          &:hover,
          &:focus {
            //  border-radius: unset;
          }
      }
  }
  .open {
    .nav-link {
      &,
      &:hover,
      &:focus {
        background-color: $nav-bg;
      }
    }
  }
}


@include media-breakpoint-down(md) {
    .nav-scroll-bar {
        display: inline-block !important;
        list-style: none;
        margin: 0;
        padding: 0 0 1px 0;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        width: 100%;
        position: initial;
        vertical-align: middle;

        .nav-item {
            display: inline-block;

            > .active {
                border-width: 2px;
            }
        }
    }
}

.tab-container {
  margin-bottom: 15px;
  .tab-content {
    padding: 15px;
    background-color: #fff;
    border: 1px solid $border-color;
    border-top-width: 0;
    border-radius: 0 0 $border-radius-base $border-radius-base;
  }
}

.pagination {
  margin: 0;
  > li, .page-item {
    > a, .page-link {
      border: none;
      &:hover,
      &:focus {
        border-color: initial;
        background-color: initial;
        text-decoration: underline;
        box-shadow: none;
      }
	}
	&.active{
		.page-link, span {
			&,
			&:hover,
			&:focus {
				z-index: 3;
				background-color: inherit;
				border-color: inherit;
				cursor: default;
                @extend .text-muted;
            }
		}
	}


  }


  @at-root .text-right & {
    -webkit-box-pack: end!important;
    -ms-flex-pack: end!important;
    justify-content: flex-end!important;
  }
}

.panel,
.card {
  border-radius: $border-radius-base;
  border-color: $border-color;
  .accordion-toggle {
    font-size: 14px;
    display: block;
    cursor: pointer;
  }
  .list-group-item {
    border-color: $panel-list-group-border;
  }
  &.no-borders {
    border-width: 0;
    .card-heading,
    .card-footer {
      border-width: 0;
    }
  }
}

.card-heading {
  .card-default & {
    background-color: $panel-heading-bg;
  }
  border-radius: $border-radius-base $border-radius-base 0 0;
  &.no-border {
    margin: -1px -1px 0 -1px;
    border: none;
  }
  .nav {
    margin: -10px  -15px;
  }
  .list-group {
    background: transparent;
  }
}

.card-footer {
  border-color: $panel-heading-border;
  border-radius: 0 0 $border-radius-base $border-radius-base;
  background-color: $panel-footer-bg;
}

.card-default {
  border-color: $panel-border;
  > .card-heading,
  > .card-footer {
    border-color: $panel-heading-border;
  }
}

.card-group .card-heading + .card-collapse .card-body {
  border-top: 1px solid #eaedef;
}

.table {
  > tbody,
  > tfoot {
    > tr {
        &:has(.stretched-link) {
            // Safari doesn't support position: relative on <tr> elements
            position: relative;
            transform: translate(0);
            clip-path: inset(0);
            overflow: clip;
        }
      > td {
        padding: 8px 15px;
        border-top: 1px solid $table-border-color;
      }
    }
  }
  > thead > tr > th {
    padding: 1em;
    border-bottom: 1px solid $table-border-color;
  }
}

.well, pre {
  background-color: $light;
  border-color: $border-color;
}

.dropdown-menu {
  display: none;
  min-width: 12rem;
  @include box-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
  border: 1px solid $border-color;
  &.pull-left {
    left: 100%;
  }
  > .panel, .card {
    border: none;
    margin: -5px 0;
  }
  > li > a {
    padding: 5px 15px;
  }

  > li > a:hover,
  > li > a:focus,
  > .active > a,
  > .active > a:hover,
  > .active > a:focus {
    background-image: none;
    filter: none;
    background-color: $light !important;
    color: $link-hover-color;
  }
}

.dropdown-menu-arrow {
  &:before {
    position: absolute;
    top: -6px;
    left: 12px;
    display: inline-block;
    border-right: 5px solid transparent;
    border-bottom: 5px solid $border-color;
    border-left: 5px solid transparent;
    border-bottom-color: rgba(0, 0, 0, 0.2);
    content: '';
  }

  &:after {
    position: absolute;
    top: -5px;
    left: 12px;
    display: inline-block;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #fff;
    border-left: 5px solid transparent;
    content: '';
  }

  &.dropdown-menu-end {
    &:before,
    &:after {
      left: auto;
      right: 12px;
    }
  }
}

.dropdown-header {
  padding: 5px 15px;
}

.dropdown-submenu {
  position: relative;
  &:hover,
  &:focus {
    > a {
      background-color: $light !important;
      color: $text-color;
    }
    > .dropdown-menu {
      display: block;
    }
  }
  &.pull-left {
    float: none !important;
    > .dropdown-menu {
      left: -100%;
      margin-left: 10px;
    }
  }
  .dropdown-menu {
    left: 100%;
    top: 0;
    margin-top: -6px;
    margin-left: -1px
  }

  .dropup & {
    > .dropdown-menu {
      top: auto;
      bottom: 0;
    }
  }
}

.btn-group > .btn {
  margin-left: -1px;
}

/*cols*/
.col-lg-2-4 {
  position: relative;
  min-height: 1px;
  padding-left: 15px;
  padding-right: 15px;
}

.col-0 {
  clear: left;
}

.row.no-gutter {
  margin-left: 0;
  margin-right: 0;
}

.no-gutter [class*="col"] {
  padding: 0;
}

.row-sm {
  margin-left: -10px;
  margin-right: -10px;
  > div {
    padding-left: 10px;
    padding-right: 10px;
  }
}

.modal-backdrop {
  background-color: $dark;
  &.in {
    opacity: 0.8;
    filter: alpha(opacity=80);
  }
}

.modal-over {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: fixed;
}

.modal-center {
  position: absolute;
  left: 50%;
  top: 50%;
}

.dropdown-item {
    align-items: center;
    display: flex;
    flex-direction: row;
    text-overflow: ellipsis;

    /*
    @include hover-focus {
        color: $dropdown-link-hover-color;
        @include gradient-bg($dropdown-link-hover-bg);
    }

     */

    &.active,
    &:active {
        color: $dropdown-link-hover-color;
        @include gradient-bg($dropdown-link-hover-bg);
    }

    &.disabled,
    &:disabled {
        color: $dropdown-link-disabled-color;
    }
}
.breadcrumb {
  border-radius: unset;
  background-color: initial;
}

.sub-menu {
    width: 100%;
    display: flex;
    transition: all .4s ease-in-out 0s;

    .dropdown-item {
        padding: .5rem 2.5rem;
    }

    .dropdown-item:hover, .dropdown-item:focus {
        background-color: inherit;
    }
}


dd {
    margin: 0;
}


.card-text {
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

sub, sup {
    font-size: 80%;
}

legend {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.toast{
    border-radius: $border-radius;
    border: none;
}


.bg-dark {
    .nav {
        .dropdown-item.active {
            color: desaturate(lighten($dark, 60%), 5%);
            @include color-schema($dark, 5%, 2.5%);
            @extend .rounded;
            @extend .shadow-sm;
        }
    }
}


@include color-mode(dark) {
    .nav-pills {
        --#{$prefix}nav-link-bg: #{rgba(lighten($grey, 10), 0.25)};
        --#{$prefix}nav-pills-link-active-bg:#{rgba(lighten($grey, 10), 0.25)};
    }
}

.nav-pills {
    --#{$prefix}nav-link-bg: #{$body-bg};
    --#{$prefix}nav-pills-link-active-bg: #{$body-bg};

    > li {
        > a {
            transition: all 340ms;
            color: var(--bs-text-body-emphasis)!important;
            &:hover,
            &:focus {
                color: var(--bs-text-body-emphasis)!important;
                background-color: var(--bs-nav-link-bg)!important;
                @extend .rounded;
            }
        }
    }
}

